<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta charset='utf-8'>
        <meta name="author" content="order by dede58.com"/>
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<title>我的订单</title>
		<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta http-equiv="Cache-Control" content="no-siteapp">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/base.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/common.css" />
		<script src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.SuperSlide.2.1.js"></script>
	</head>

	<body>
		<jsp:include page="title.jsp" flush="true" />
		<jsp:include page="navbar.jsp" flush="true" />

		<!--Main-wrap-->
		<div class="main-wrap graybg">
			<div class="wrapper pt40 pb40 clearfix">
				<div class="fl slide-nav white-box">
					<ul>
						<li>
							<a href="${pageContext.request.contextPath}/userSelectById" class="db fs16">个人信息</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath}/Auction/selectByUserId" class="db fs16">我的竞拍</a>
						</li>
						<li class="on">
							<a href="${pageContext.request.contextPath}/Order/selectOrderByUser" class="db fs16">我的订单</a>
						</li>
						
						<li>
							<a href="${pageContext.request.contextPath}/adressList" class="db fs16">收货地址</a>
						</li>
						
						
						<li>
							<a href="${pageContext.request.contextPath}/accountList" class="db fs16">账户余额</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath}/recharge" class="db fs16">在线充值</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath}/password" class="db fs16">修改密码</a>
						</li>						
					</ul>
				</div>
				<div class="fr slide-show white-box">
					<div class="dark-tit clearfix">
						<h3 class="fl fs26">我的订单</h3>
						<p class="fr slide-t-nav">
							<a href="#" class="on fs14 radius3">有效订单</a>
							<a href="#" class="fs14 radius3">待支付</a>
							<a href="#" class="fs14 radius3">待收货</a>
							<a href="#" class="fs14 radius3">已关闭</a>
						</p>
					</div>
					<table class="table_1">
						<tr>
							<th width="30%">商品信息</th>
							<th width="16%">单价（元）</th>
							<th width="15%">数量</th>
							<th width="15%">收货人</th>
							<th width="24%" rowspan="2">订单状态</th>
						</tr>
					</table>
					<c:forEach items="${order}" var="order">
					<table class="table_1 mt15">
						<tr>
							<th align="left" colspan="6">
								<p class="fs12"><span class="fr pr10">订单金额：${order.orderPrice}</span>订单号：${order.orderId}　下单时间：${order.orderTime}</p>
							</th>
						</tr>
						<tr>
							<td width="30%">
								<p class="clearfix o-goods-info">
									<a href="#" class="fl"><span><img src="${pageContext.request.contextPath}/upload/2.jpg" alt=""></span></a>
									<span class="fl tit ">${order.auctionInfo.art.artName}</span>
								</p>
							</td>
							<td width="16%" align="center">￥${order.orderPrice}</td>
							<td width="15%" align="center">${order.orderSum}</td>
							<td width="15%" rowspan="2" align="center">${order.adress.adressName}</td>
							<td width="12%" rowspan="2" align="center">
								<c:choose>
									<c:when test="${order.orderState==1}">待付款
									</c:when>
									<c:when test="${order.orderState==2}">已付款等待发货</c:when>
									<c:when test="${order.orderState==3}">已发货</c:when>
									<c:when test="${order.orderState==4}">交易完成</c:when>
									<c:when test="${order.orderState==5}">交易失效</c:when>
									<c:when test="${order.orderState==6}">交易取消</c:when>
								</c:choose>
								<br><a href="${pageContext.request.contextPath}/Order/selectById?orderId=${order.orderId}" class="orange">订单详情</a>
							</td>
							<td width="12%" rowspan="2" align="center">
								<c:choose>
									<c:when test="${order.orderState==1}"><a href="${pageContext.request.contextPath}/payment?orderId=${order.orderId}&&orderPrice=${order.orderPrice}" class="a-sqsh green radius3">付款</a>
									</c:when>
									<c:when test="${order.orderState==2}"><a href="" class="a-sqsh green radius3">催货</a></c:when>
									<c:when test="${order.orderState==3}"><a href="${pageContext.request.contextPath}/Order/confirm?orderId=${order.orderId}" class="a-sqsh green radius3">确认收货</a></c:when>
									<c:when test="${order.orderState==4}"><a href="" class="a-sqsh green radius3">评价</a></c:when>
									<c:when test="${order.orderState==5}"><a href="" class="a-sqsh green radius3">交易取消</a></c:when>
								</c:choose>
							</td>
						</tr>
					</table>
					</c:forEach>
					<div class="tab-pages">
						<a href="#" class="tab-prev tab-btn">上一页</a>
						<a href="#" class="page-btn current">1</a>
						<a href="#" class="page-btn">2</a>
						<a href="#" class="page-btn">3</a>
						<a href="#" class="tab-next tab-btn">下一页</a>
					</div>

				</div>

			</div>
		</div>
		<!--/end-->

		<jsp:include page="foot.jsp" flush="true" />
	</body>

</html>